package com.air.common.service.imp;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service;

import com.air.common.service.IDBSyncService;
import com.air.common.service.ISystemConfigService;

@Service
public class DBSyncServiceImp implements IDBSyncService {
	
	@Autowired
	ISystemConfigService systemConfigService;
	
	@Override
	@Scheduled(fixedDelay = 5*3600*1000)  
	public void sync() {
		systemConfigService.reloadConfigFromDB();
		System.out.println("------------------------DB Sync-----------------------------------");
	}

}
